Creating a Repository
Introduced in Pacman a new script named repo-add which makes generating a database for a personal repository much easier. Use repo-add --help for more details on its usage.
Simply store all of the built packages to be included in the repository in one directory, and execute the following command (where repo is the name of the custom repository):
$ repo-add /path/to/repo.db.tar.gz /path/to/*.pkg.tar.gz
Note that when using repo-add, the database and the packages do not need to be in the same directory. But when using pacman with that database, they should be together.
To add a new package (and remove the old if it exists), run:
$ repo-add /path/to/repo.db.tar.gz /path/to/packagetoadd-1.0-1-i686.pkg.tar.gz
Note: If there is a package that needs to be removed from the repository, read up on repo-remove.
Once the local repository has been made, add the repository to pacman.conf. The name of the db.tar.gz file is the repository name. Reference it directly using a file:// url.
Making your repository public
- If you are serving public FTP on your computer, other computers can easily access it via FTP using ftp://localhost/path/to/directory.
- If you want to make the repo available to others using HTTP, put the repository in the Public folder of your server (where you place website files).
- If you do not have your own server, the best way is to use Dropbox as a server. Just put your repo in the Public folder, and give out the link.
- And if willing, add the custom repository to the list of Unofficial Repositories, so that the community can benefit from it.